package main

import "fmt"

func main() {
	var s []int
	fmt.Println(s)

	a:= [10]int{1,2,3,4,5,6,7,8,9,10}
	fmt.Println(a)
	s1 := a[3:9]
	fmt.Println(s1)
	s2 := a[3:]
	fmt.Println(s2)

	ss := make([]int, 3, 10)
	fmt.Println(ss)
	fmt.Println(len(ss),cap(ss))

	a1:= []byte{'a','b','c','d','e','f'}
	sa :=a1[2:]
	fmt.Println(string(sa))
	fmt.Println(len(sa),cap(sa))
	sb := sa[1:2]
	fmt.Println(string(sb))

	ss1:=make([]int, 3, 6)
	fmt.Printf("%p",ss1)
	ss1 = append(s1,1,2,3)
	fmt.Printf("%p",ss1)
	ss1 = append(s1,1,2,3)
	fmt.Printf("%p",ss1)


	a3 := []int {1,2,3,4,5,6}
	as1 := a3[2:5]
	as2 := a3[1:3]
	fmt.Println(as1, as2)
	a3[2] = 9
	fmt.Println(as1, as2)

	sa1 := []int {1,2,3,4,5,6}
	ss2:= []int{7,8,9}
	//copy(sa1, ss2)
	//fmt.Println(sa1)
	copy(ss2, sa1)
	fmt.Println(ss2)

}
